﻿using System;
using System.ComponentModel.DataAnnotations;

namespace VideoRentalShop.Model
{
    public class OrderDetails
    {
        private static readonly DateTime MIN_DATE = new DateTime(1950, 1, 1);


        public OrderDetails()
        {
            MaxReturnDate = MIN_DATE;
            ReturnDate = null;
        }


        [Required]
        public long Id { get; set; }

        [Required]
        public long OrderId { get; set; }
        public virtual Order Order { get; set; }
        
        [Required]
        public long MovieId { get; set; }
        public virtual Movie Movie { get; set; }
        
        [Required]
        public DateTime MaxReturnDate { get; set; }
        
        public DateTime? ReturnDate { get; set; }
    }
}
